import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "/",
      name: "无答统计",
      component: function(resolve) {
        require(["@/components/count/index.vue"], resolve);
      }
    },
    // 问题
    {
      path: "/problem",
      name: "知识库",
      component: function(resolve) {
        require(["@/components/problem/index.vue"], resolve);
      }
    },
    {
      path: "/problem/add",
      name: "添加知识库",
      component: function(resolve) {
        require(["@/components/problem/addEdit.vue"], resolve);
      }
    },
    {
      path: "/problem/edit",
      name: "编辑知识库",
      component: function(resolve) {
        require(["@/components/problem/addEdit.vue"], resolve);
      }
    },
    // 匹配规则
    {
      path: "/rules",
      name: "规则库",
      component: function(resolve) {
        require(["@/components/rules/index.vue"], resolve);
      }
    },
    {
      path: "/rules/add",
      name: "编辑规则",
      component: function(resolve) {
        require(["@/components/rules/addEdit.vue"], resolve);
      }
    },
    {
      path: "/rules/edit",
      name: "添加规则",
      component: function(resolve) {
        require(["@/components/rules/addEdit.vue"], resolve);
      }
    },
    // 应用管理
    {
      path: "/user",
      name: "用户管理",
      component: function(resolve) {
        require(["@/components/user/index.vue"], resolve);
      }
    },
    {
      path: "/user/add",
      name: "添加用户",
      component: function(resolve) {
        require(["@/components/user/addEdit.vue"], resolve);
      }
    },
    {
      path: "/user/edit",
      name: "编辑用户",
      component: function(resolve) {
        require(["@/components/user/addEdit.vue"], resolve);
      }
    }
  ]
});
